package sopraim.entity;

import java.util.HashSet;
import java.util.Set;
import java.util.Vector;

/**
 * user account
 * @author INFO-A1
 */
public class User {
    
    private int id ;
    private String username ;
    private String password ;
    private Status status;
    private Location location;
    private boolean isAdmin ;
    
    private String name ;
    private String firstName ;
    private String mail ;
    
    private Set<User> friends;
    
    
    public User() {
        friends = new HashSet<User>();
    }
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }
    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }
    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }
    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }
    /**
     * @return the status
     */
    public Status getStatus() {
        return status;
    }
    /**
     * @param status the status to set
     */
    public void setStatus(Status status) {
        this.status = status;
    }
    /**
     * @return the isAdmin
     */
    public boolean getIsAdmin() {
        return isAdmin;
    }
    /**
     * @param isAdmin the isAdmin to set
     */
    public void setIsAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }
    /**
     * @param firstName the firstName to set
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
    /**
     * @return the mail
     */
    public String getMail() {
        return mail;
    }
    /**
     * @param mail the mail to set
     */
    public void setMail(String mail) {
        this.mail = mail;
    }
    
    public boolean checkPassword(String passwordToCheck) {
        return(passwordToCheck.equals(password) );
    }
    /**
     * @return the location
     */
    public Location getLocation() {
        return location;
    }
    /**
     * @param location the location to set
     */
    public void setLocation(Location location) {
        this.location = location;
    }
    
    public Set<User> getFriends() {
        return friends;
    }
    
    public void setFriends(Set<User> friends) {
        this.friends = friends;
    }
    
    
}